<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="author" content="m.178hui.com" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  <meta name="format-detection" content="telephone=no">
  <link rel="stylesheet" href="css/style.css"/>
  <link rel="stylesheet" href="css/media.css"/>
  <script src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"> </script> 
  <style type="text/css">
    body{
      background: #f4f4f4;
    }
  </style>
</head>
<body>
  <div class="main" id="app">
    <div class="top_title">
      <i class="u-arrow u-arrow-left" @click="history.go(-1)"></i>
      <h2 class="title">门票预订</h2>
    </div>
    <div class="pro_img">
      <img src="images/02.png" alt="暂无图片"/>
    </div>
    <div class="content">
      <div class="con_title">
        <img class="mainIcon" src="images/mainIcon.png"/>
        <span class="con_text">门票推荐</span>
      </div>
      <div class="con_wrapper">
        <div class="con_ticket" v-for="item in ticketList">
          <div class="con_left">
            <h4>{{item.title}} <b>￥{{item.price}}</b></h4>
            <p>{{item.desc}}</p>
          </div>
          <div class="con_right">
            <a :href="'prePurchaseTicket.html?id='+item.id">立即预购</a>
          </div>
        </div>
        <div class="con_tip">
          <p>如果您有任何疑问，请致电<a href="tel:400-6238086" class="fontc">400-6238086</a></p>
        </div>
      </div>
    </div>
  </div>
  <div class="order_footer">
    <div class="order_footer_btn">
      <a class="lxkf" href="tel:400-6238086">联系客服</a>
      <a href="ticketOrder.html" class="myOrder">我的订单</a>
    </div>
  </div>
</body>
<script src="js/vue.min.js"></script>
<script src="js/axios.min.js"></script>
<script>

  new Vue({
    el:'#app',
    data(){
      return {
        ticketList:[
          {id:1,title:'一日票',desc:'一日触达财富通道',price:'30'},
          {id:2,title:'团体票', desc:'企业三人行，共助发展',price:'70'},
          {id:3,title:'展会通票',desc:'3个月的财富通路',price:'360'}
        ]
      }
    },
    created(){
      //this.getRequest()
        this.getCode()
    },
    methods:{
        // 获取code发送给后端
        getCode() {
            let url = '?code=211kmsakldoa&state=123';
            // let url = location.search;
            let index1 = url.indexOf('code=');
            let index2 = url.indexOf('&state');

            let code = url.substring(index1 + 5, index2);
            console.log("url:",index1,"-",index2,"-",code);

        }
      }


  })
</script>
</html>
